package com.hrm.company;

import com.hrm.common.utils.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

// 1. 配置SpringBoot的包扫描
@SpringBootApplication(scanBasePackages = "com.hrm")
// 2. 配置mybatis包扫描路径
@MapperScan("com.hrm.mapper")
public class CompanyApplication {
    /**
     * 启动方法
     */
    public static void main(String[] args) {
        SpringApplication.run(CompanyApplication.class, args);
    }

    @Bean
    public IdWorker idWorker() {
        return new IdWorker();
    }
}
